Object subclass: #BinTree
	instanceVariableNames: 'label leftKid rightKid'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'BinTree'!

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:31'!
addLeftKid:theLeftKid
	"set the node's left child"
	leftKid := theLeftKid.! !

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:31'!
addRightKid:theRightKid
	"set the node's right child"
	rightKid := theRightKid.! !

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:29'!
label
	"return the node's label"
	^label.! !

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:32'!
leftKid
	"return the node's left child"
	^leftKid.! !

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:33'!
rightKid
	"return the node's right child"
	^rightKid.! !

!BinTree methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 12:30'!
setLabel:theLabel
	"set the node's label"
	label := theLabel.! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

BinTree class
	instanceVariableNames: ''!

!BinTree class methodsFor: 'as yet unclassified' stamp: 'RGB 3/8/2011 16:15'!
new:theLabel
	"create a new tree node with the specified label"
	| theTree |
	theTree := super new initialize.
	theTree setLabel: theLabel.
	^theTree.! !
